import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/login/home.vue'
import cart from '../views/login/children/cart.vue'
import my from '../views/login/children/my.vue'
import cla from '../views/login/children/cla.vue'
import index from '../views/login/children/index.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/login',
      name: 'login',
      component: HomeView,
      children:[
        {
          path:'cart',
          name:'cart',
          component:cart
        },
        {
          path:'my',
          name:'my',
          component:my
        },
        {
          path:'cla',
          name:'cla',
          component:cla
        },
        {
          path:'index',
          name:'index',
          component:index
        },
      ]
    },
    // {
    //   path: '/about',
    //   name: 'about',
    //   // route level code-splitting
    //   // this generates a separate chunk (About.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import('../views/AboutView.vue'),
    // },
  ],
})

export default router
